<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h2>IOS 里面Vue 项目， 删除里面值，导致只剩下一行placeholder</h2>
    <div>
        <textarea v-model="val" :placeholder="placeholderData" name="" id="" cols="30" rows="10" ></textarea>
    </div>
    <script>
        export default {
            data () {
                return {
                    val: '',
                    placeholderData: ''
                };
            },
            watch: {
                val (newval) {
                    if (newval) {
                        this.placeholderData = '';
                    } else {
                        this.placeholderData = '我是placeholder'
                    }
                }
            }
        }
    </script>
</body>
</html>